package main

import (
    "net/http"
    "./lib"
    "fmt"
    "os"
)

func route(w http.ResponseWriter, r *http.Request){
    lib.InitRoute(w, r)
}

func main(){
    
    host := "0.0.0.0:9000"
    
    if len(os.Args) == 2{
        host = os.Args[1]
    }
    fmt.Println("服务器监听："+host)
    http.HandleFunc("/", route)
    http.ListenAndServe(host, nil)
}